<template>
	<div class="app-container">
		<div class="policyupper3c">
			<div class="p-detail">
				<p>
					<i class="iconfont icon-biaoti"></i> {{info.batchName}}
					<span class="add" v-if='info.isReward'>奖励</span>
					<span class="state state1" v-if='info.state==0'>编辑中</span>
					<span class="state state2" v-else-if='info.state==3'>生效中</span>
					<span class="state state3" v-else-if='info.state==4'>已过期</span>
					<span class="state state4" v-else-if='info.state==1'>待审批</span>
					<span class="state state5" v-else-if='info.state==5'>已驳回</span>
					<span class="state state6" v-else-if='info.state==2'>待生效</span>
				</p>
				<el-dialog title="编辑批次信息" :visible.sync="isshows" width="40%">
					<el-form :model="copyinfo" :rules="ruless" ref="copyinfo" label-width="120px" class="demo-ruleForm">
						<el-form-item class="informationaa" label="批次名称:" prop="batchName">
							<el-input v-model="copyinfo.batchName" class="selects" size="mini" placeholder="请输入批次名称"></el-input>
						</el-form-item>

						<el-form-item class="informationaa" label="保险公司:" prop="insuranceId">
							<!--@change="changecomony(copyinfo.insuranceId)"-->
							<el-select class="selects" size="mini" disabled v-model="copyinfo.insuranceId" placeholder="请选择保险公司">
								<el-option-group v-for="group in options" :key="group.letter" :label="group.letter">
									<el-option v-for="item in group.insurances" :key="item.id" :label="item.insuranceName" :value="item.id">
									</el-option>
								</el-option-group>
							</el-select>
						</el-form-item>									<!-- prop="upperBatchID"-->
						<el-form-item class="informationaa" label="选择上游批次:">
							<!--@change="worknumchange"-->
							<el-select class="selects" disabled size="mini" v-model="copyinfo.upperBatchID" placeholder="请选择上游批次">
								<el-option class="selects" v-for="item in uppoliy" :label="item.batchName" :value="item.id">
								</el-option>
							</el-select>
						</el-form-item>

						<el-form-item class="informationaa" label="适用工号:" prop="staffId">
							<el-select class="selects" disabled size="mini" v-model="copyinfo.staffId" multiple placeholder="请选择">
								<el-option class="selects" v-for="item in workoptions" :key="item.id" :label="item.staffAccount" :value="item.staffId">
								</el-option>
							</el-select>
						</el-form-item>

						<el-form-item class="informationaa informations" label="有效时间:" required>
							<el-col :span="8">
								<el-form-item prop="effectiveDate">
									<el-date-picker disabled class="dateinp" size="mini" v-model="copyinfo.effectiveDate"  prefix-icon=" " type="datetime" placeholder="生效时间"></el-date-picker>
								</el-form-item>
							</el-col>
							<el-col class="line" :span="1">到</el-col>
							<el-col :span="5">
								<!--endateprop-->
								<el-form-item>
									<el-date-picker disabled class="dateinp" size="mini" v-model="copyinfo.expiryDate"  :disabled="islimit" prefix-icon=" " type="datetime" placeholder="截止时间"></el-date-picker>
								</el-form-item>
							</el-col>
							<div class="sscheckbox">
								<el-checkbox  disabled v-model="islimit">不限</el-checkbox>
							</div>
						</el-form-item>

						<el-form-item class="informationaa informations" label=" ">
							<p class="texts">
								<i class="iconfont icon-xuanzhong"></i> 以<span>{{copyinfo.matchDateType}}</span>作为匹配日期类型
							</p>
						</el-form-item>
						<el-form-item class="informationaa informationdd">
							<el-button type="primary" size="small" class="btn" @click="btn('copyinfo')">确定</el-button>
						</el-form-item>
					</el-form>
				</el-dialog>
				<!--提交审核-->
				<el-dialog title="审核提示" :visible.sync="dialogTableVisible" width="500px" class="toDis-dialog upper4-dialog" :close-on-click-modal="false">
					<p class="dialog-tit">该政策所选工号与以下政策批次中的工号冲突，是否确认提交审核！</p>
					<div class="dialog-max">
						<div class="visi-wrp" v-for="(item,index) in existence">
							<!--<div class="visi-wrp">-->
							<div class="visi-list">
								<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;批次名称：{{item.batchName}}</div>
								<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;有效时间：{{item.effectiveDate}} 到
									<span v-if="item.expiryDate">{{item.expiryDate}}</span>
									<span v-else>不限</span>
								</div>
							</div>
						</div>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button class="upper4-sureBtn" @click="goEdit">取消</el-button>
						<el-button class="upper4-sureBtn" type="primary" @click="toRoval_sure()">确 定</el-button>
					</div>
				</el-dialog>
				<el-dialog title="驳回原因" :visible.sync="Rejectshow" width="690px" class="toDis-dialog2" :close-on-click-modal="false">
				<el-form :model="ruleForm" :rules="rule" ref="ruleForm" label-width="100px" class="demo-ruleForm">
					<el-row :gutter="20">
						<el-form-item label="" prop="dismissalSeason">
				    		<el-input class="toDis-textarea" type="textarea" rows="12" placeholder="请输入驳回原因" v-model="ruleForm.dismissalSeason"></el-input>
				    	</el-form-item>
				    </el-row>
				  	<el-form-item class="dialog-sec-wp">
				    	<el-button type="primary" class="toDis-toRoval-btn" @click="toDis_sure('ruleForm')">确 定</el-button>
				  	</el-form-item>
				</el-form>
			</el-dialog>
			
				<div class="d-box">
					<button class="editbatch" @click="batchedit" v-if="info.state==0||info.state==5">编辑批次信息</button>
					<p>
						<span>保险公司：</span><span class="d-setc">{{info.insuranceName}}</span>&nbsp;&nbsp;
						<span>有效日期：</span>
						<span class="d-setc">{{info.effectiveDate}}<span class="daos">到</span>
						</span>
						<span class="d-setc" v-if="info.expiryDate">{{info.expiryDate}}</span>
						<span class="d-setc" v-else> 不限</span>&nbsp;&nbsp;
						<span>匹配日期类型：</span><span class="d-setc">{{info.matchDateType}}</span>&nbsp;&nbsp;
					</p>
					<p>
						<span>适用工号：</span><span class="d-setc" v-for='(item,index) in info.staffNames'>
						<span class="d-setc isF">&nbsp;&nbsp;|&nbsp;&nbsp;</span>{{item.staffAccount}}({{item.describe}})
							<span v-if="info.staffNames.length-1!=index">，</span>
						</span>
					</p>
				</div>
			</div>
			<div class="p-list">
				<table class="util-table" width="100%">
					<tr>
						<th rowspan="2" width="41%">政策备注信息</th>
						<th rowspan="2" width="9%">上/下游</th>
						<th colspan="2" width="18%" style="border:1px solid white;border-top:0;">交强险</th>
						<th colspan="2" width="18%" style="border:1px solid white;border-top:0;">商业险</th>
						<th rowspan="2" width="14%">操作</th>
					</tr>
					<tr>
						<th width="100">佣金</th>
						<th width="100" style="border-right:1px solid white">奖励</th>
						<th width="100">佣金</th>
						<th width="100">奖励</th>
					</tr>
					<tr v-for='(item,indexout) in policylist'>
						<td width="41%" style="padding-left:9px;">{{item.remarks}}</td>
						<td  colspan="6">
							<table width="100%" class='tableinof'>
							<tr class="tecenter">
								<td width="15.32%" class="upname" style="border-right:1px solid #E8E8E8;">上游</td>
								<td width="15.3%">
									{{item.upperBrokerageTraffic}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td width="15.3%" style="border-right:1px solid #E8E8E8;">
									{{item.upperRewardTraffic}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td width="15.3%" >
									{{item.upperBrokerageBusiness}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td width="15.3%" style="border-right:1px solid #E8E8E8;">
									{{item.upperRewardBusiness}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td width="25%" class="setc btnsetc">
									<template v-if="info.state==0||info.state==5">
										<!--@click='toDetail(item.policyId)'-->
										<a @click="addlowpolic(item)">添加</a>
										<a @click="toDetail(item.policyId)">详情</a>	
									</template>
									<template v-else>
										<a>详情</a>
									</template>
								</td>
							</tr>
							<tr class="tecenter">
								<td  class="downname" style="border-right:1px solid #E8E8E8;">下(通)</td>
								<td >
									{{item.lowerBrokerageTraffic}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td style="border-right:1px solid #E8E8E8;">
									{{item.lowerRewardTraffic}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td>
									{{item.lowerBrokerageBusiness}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td style="border-right:1px solid #E8E8E8;">
									{{item.lowerRewardBusiness}} 
									<span v-if="item.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td class="setc btnsetc">
									<a v-if="info.state==0||info.state==5" @click="Lowerpasseeditshow(item,indexout)">编辑</a>	
									<div class="Proportionedit" v-if="item.Lowerpassiseditshow">
					
								<el-popover
								  placement="top"
								  width="420"
								  v-model="item.Lowerpassiseditshow">
								  <div class="Proportionedit_top">
									<div class="Proportionedit_left">
										<p class="Proportionedit_title">交强险</p>
										<div class="Proportionedit_name">
											<p>佣金：</p>
											<p>奖励：</p>
										</div>
										<div class="Proportionedit_name" :class="indexs==1?'actives':''">
											<div class="">
												<input @blur="blurs1" v-model="additional.lowerBrokerageTraffic"  class="Proportionedit_inp" size="mini" placeholder="-" /> 
												<span v-if="additional.brokerageBusinessType==0">%</span>
												<span v-else>元</span>
											</div>
											<div id="">
												<input @blur="blurs2" v-model="additional.lowerRewardTraffic" class="Proportionedit_inp" size="mini" placeholder="-" /> 
												<span v-if="additional.brokerageBusinessType==0">%</span>
												<span v-else>元</span>
											</div>
											
										</div>
									</div>
									<div class="Proportionedit_left">
										<p class="Proportionedit_title">商业险</p>
										<div class="Proportionedit_name">
											<p>佣金：</p>
											<p>奖励：</p>
										</div>
										<div class="Proportionedit_name" :class="indexs_tow==2?'activess':''">
											<div>
												<input @blur="blurs3" v-model="additional.lowerBrokerageBusiness" class="Proportionedit_inp" size="mini" placeholder="-" /> 
												<span v-if="additional.brokerageBusinessType==0">%</span>
												<span v-else>元</span>
											</div>
											<div>
												<input @blur="blurs4" v-model="additional.lowerRewardBusiness" class="Proportionedit_inp" size="mini" placeholder="-" /> 
												
											</div>
										</div>
									</div>
								</div>
								  <div style="text-align: right; margin: 0">
								    <el-button size="mini"type="info" @click="Lowerpassedithide">取消</el-button>
								    <el-button size="mini" @click="subpolicy(item)">确定</el-button>
								  </div>
								</el-popover>
							</div>
								</td>
							</tr>
							<tr class="tecenter" v-for="(val,index) in item.extends">
								<td  class="downname">下
									<span v-if="val.extendTypes==1">(部)</span>
									<span v-else>(员)</span>
								</td>
								<td >
									{{val.lowerBrokerageTraffic}} 
									<span v-if="val.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td >
									{{val.lowerRewardTraffic}} 
									<span v-if="val.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td >
									{{val.lowerBrokerageBusiness}} 
									<span v-if="val.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td >
									{{val.lowerRewardBusiness}} 
									<span v-if="val.brokerageBusinessType==0">%</span>
									<span v-else>元</span>
								</td>
								<td class="setc btnsetc">
									<a v-if="info.state==0||info.state==5" @click="editshow(val,index,indexout)">编辑</a>
									<a v-if="info.state==0||info.state==5" @click="isdeletetrue(val,index,indexout)">删除</a>
									<div class="Proportionedit_delete" v-if="val.isdelete">
									<el-popover
									  placement="bottom"
									 width="250"
									  v-model="val.isdelete">
									  <p class="candeletes">确定删除吗？</p>
									  <div style="text-align: right; margin: 0">
									    <el-button size="mini" type="info" @click="isdeletefalse">取消</el-button>
									    <el-button  size="mini" @click="deletepolicy(val)">确定</el-button>
									  </div>
									</el-popover>
								</div>
								</td>
							</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td colspan="7" style="text-align: center;padding:10px 0;"><span class="addN" @click='toEdit()'>+&nbsp;新建政策</span></td>
					</tr>
				</table>
			</div>
			<div class="p-btn">
				<el-button size='mini' v-if="info.state==0||info.state==5"  class='wd100 setborder' @click="toexamine">{{rovalHtml}}</el-button>
				<el-button size='mini' v-if="info.state==0||info.state==5" class='wd100 setborder' @click="deletebatch">删除</el-button>
				<el-button size='mini' v-if="!(info.state==0||info.state==5)&&Jurisdiction==1" class='wd100 setborder' @click="Applicationeditor">申请编辑</el-button>
				<el-button size='mini' v-if="info.state==2||info.state==3||info.state==4" class='wd100 setborder' @click="generate">生成下游政策</el-button>
				<el-button size='mini' v-if="info.state==1&&Jurisdiction==2" class='wd100 setborder' @click="adopt">通过</el-button>
				<el-button size='mini' v-if="info.state==1&&Jurisdiction==2" class='wd100 setborder' @click="reject">驳回</el-button>
			</div>
			<el-dialog title="编辑下游政策" :visible.sync="isshow" width="550px" :close-on-click-modal='false'>
				<div class="content">
					<el-form :model="json" :rules="rules" ref="json">
						<el-form-item label="添加对象类型:" :label-width="formLabelWidth" prop="extendType">
							<el-select class="inputs" v-model="json.extendType" size="mini" placeholder="请选择部门">
								<el-option v-for="item in objtypelist" :label="item.name" :value="item.value"></el-option>
							</el-select>
						</el-form-item>

						<!--<el-form-item label="添加对象:" :label-width="formLabelWidth" prop="">
				      <el-select class="inputs" v-model="json.region" size="mini" placeholder="请选择对象">
				        <el-option v-for="item in addobj" label="区域一" value="shanghai"></el-option>
				      </el-select>
				    </el-form-item>-->

						<el-form-item label="添加对象" :label-width="formLabelWidth" prop="targetId">
							<el-select v-if="json.extendType==1" class="inputs" multiple v-model="json.targetId" size="mini" placeholder="请选择对象">
								<el-option v-for="item in organization" :label="item.organizationName" :value="item.organizationId"></el-option>
							</el-select>
	
							<el-select v-else class="inputs" multiple v-model="json.targetId" size="mini" placeholder="请选择对象">
								<el-option v-for="item in userlist" :label="item.userName" :value="item.id"></el-option>
							</el-select>
						</el-form-item>

						<el-form-item label="保费类型:" :label-width="formLabelWidth" prop="premiumType">
							<el-select class="inputs" v-model="json.premiumType" size="mini" placeholder="请选择保费类型">
								<el-option v-for="item in premiumlist" :label="item.name" :value="item.value"></el-option>
							</el-select>
						</el-form-item>

						<el-form-item label="返佣类型:" :label-width="formLabelWidth" prop="brokerageBusinessType">
							<el-select class="inputs" v-model="json.brokerageBusinessType" size="mini" placeholder="请选择返佣类型">
								<el-option v-for="item in Maidlist" :label="item.name" :value="item.value"></el-option>
							</el-select>
						</el-form-item>

						<el-form-item label="是否扣点:" :label-width="formLabelWidth" prop="points">
							<el-select class="inputs" v-model="json.points" size="mini" placeholder="请选择是否扣点">
								<el-option v-for="item in Pointslist" :label="item.name" :value="item.value"></el-option>
							</el-select>
						</el-form-item>

						<el-form-item label="交强险设置:" :label-width="formLabelWidth">
							<div class="numcontent" :class="indexs==1?'actives':''">
								佣金
								<el-input @blur="blurs1" class="numinp" v-model="json.lowerBrokerageTraffic" size="mini"></el-input>
								<span> {{json.brokerageBusinessType  | isPercentage}}</span> 奖励
								<el-input @blur="blurs2" class="numinp" v-model="json.lowerRewardTraffic" size="mini"></el-input>
								<span> {{json.brokerageBusinessType  | isPercentage}}</span>
							</div>
						</el-form-item>

						<el-form-item label="商业险设置:" :label-width="formLabelWidth">
							<div class="numcontent" :class="indexs_tow==2?'actives':''">
								佣金
								<el-input @blur="blurs3" class="numinp" v-model="json.lowerBrokerageBusiness" size="mini"></el-input>
								<span> {{json.brokerageBusinessType  | isPercentage}}</span> 奖励
								<el-input @blur="blurs4" class="numinp" v-model="json.lowerRewardBusiness" size="mini"></el-input>
								<span> {{json.brokerageBusinessType  | isPercentage}}</span>
							</div>
						</el-form-item>
						<el-form-item class="btns">
							
							<el-button type="primary" @click.stop="submits('json')">确 定</el-button>
						</el-form-item>
						
						<!-- <el-form-item label="车船税设置:" :label-width="formLabelWidth" prop="">
						<div class="numcontent">
							佣金
							<el-input @blur="blurs5" class="numinp" v-model="json.lowerBrokerageVehicleTax" size="mini"></el-input>
							<span> {{json.brokerageBusinessType  | isPercentage}}</span>
						</div>
					</el-form-item> -->

						<!-- <el-form-item label="备注信息:" :label-width="formLabelWidth">
						<el-input class="inputs" type="textarea" :rows="2" placeholder="请填写备注信息" v-model="json.remarks">
						</el-input>
					</el-form-item> -->
						
					</el-form>
				</div>
			</el-dialog>
		</div>
	</div>
</template>
<script>
	import Vue from "vue"
	import nextnav from './assembly/nextnav'
	import treeSelect from "@/components/tree-select/tree.vue";
	export default {
		data() {
			return {
				ruleForm:{
					dismissalSeason:null
				},
				ruless:{dismissalSeason:[{ required: true, message: '请输入驳回原因', trigger: 'blur' }]},
				Rejectshow:false,
				dialogTableVisible:false,
				existence:[],
				rovalHtml:"提交审核",
				isshows: false,
				id: null, //当前id
				policylist: [],
				options: [],
				uppoliy: [],
				workoptions: [],
				info: null,
				navnum: 2,
				dialogShow: false,
				//dialog
				isshow: false,
				formLabelWidth: '120px',
				objtypelist: [ //对象列表
					//					{name:"政策",value:"0"},
					{
						name: "组织",
						value: "1"
					},
					{
						name: "用户",
						value: "2"
					}
				],
				premiumlist: [ //保费列表
					{
						name: "按净保费",
						value: "1"
					},
					{
						name: "按全保费",
						value: "0"
					}
				],
				Maidlist: [ //保费列表
					{
						name: "百分比",
						value: "0"
					},
					{
						name: "人名币",
						value: "1"
					}
				],
				Pointslist: [ //扣点
					{
						name: "是",
						value: "1"
					},
					{
						name: "否",
						value: "0"
					}
				],
				addobj: [ //添加对象列表

				],
				rule: {
					batchName: [{
							required: true,
							message: '请输入批次名称',
							trigger: 'blur'
						},
						{
							min: 1,
							max: 50,
							message: '长度在 1 到 50个字符',
							trigger: 'blur'
						}
					]
				},
				rules: {
					extendType: [{
						required: true,
						message: '请选择对象类型',
						trigger: 'change'
					}],
					targetId: [{
						required: true,
						message: '请选择对象',
						trigger: 'change'
					}],
					premiumType: [{
						required: true,
						message: '请选择保费类型',
						trigger: 'change'
					}],
					brokerageBusinessType: [{
						required: true,
						message: '请选择返佣类型',
						trigger: 'change'
					}],
					points: [{
						required: true,
						message: '请选择是否扣点',
						trigger: 'change'
					}]

				},
				json: {
					policyItemId: "", //政策id
					extendType:"2", //对象类型,
					targetId:[], //对象
					premiumType: "1", //保费类型
					brokerageBusinessType: "0", //返佣类型
					points: "0", //是否扣点
					lowerBrokerageTraffic: "0", //交强-佣金
					lowerRewardTraffic: "0", //较强——奖励
					lowerBrokerageBusiness: "0", //商业-佣金
					lowerRewardBusiness: "0", //商业——奖励
					lowerBrokerageVehicleTax: "0", //下游车船税佣金比例
					//	remarks: "" //备注

				},
				userlist: [],
				treeData: [], //树数据
				treeProps: {
					label: "displayName",
					children: "orgs",
					level: "depth",
					value: 'id'
				}, //树属性
				copyinfo: {
					staffId: []
				},
				islimit: false,
				policyId:null,
				Jurisdiction:"",
				indexs:null,
				indexs_tow:null,
				additional:{},
				organization:[]
			}
		},
		mounted() {
						//batchId Jurisdiction
				this.id = this.$route.query.batchId;
				this.Jurisdiction=this.$route.query.Jurisdiction
				this.getBasic();
				this.getPolicyList();
				this.gethomes()
				this.getuesr()
			
		},
		filters: {
			isPercentage(val) {
				if(val == 0) {
					return "%"
				} else {
					return "元"
				}
			}
		},
		components: {
			nextnav,
			treeSelect
		},
		methods: {
			//获取组织
			gethomes(){
				//organization
				let params = {
					
				}
				 this.post(params,"services/app/common/ChildOrganizations").then(res=>{
							console.log(res)
							if(res.success){
								console.log("zuzhi")
								console.log(res)
								this.organization=res.result
							}else{
								 this.$notify.error({
						              title: '错误',
						              message: res.error.message
						            });
		
							}
						})
			},
			//弹出删除
			isdeletetrue(val,e,oute){
				this.edithide()
				console.log(1111)
					var arr=[]
				for(let i=0;i<this.policylist.length;i++){
					if(i==oute){
						for(let j=0;j<this.policylist[i].extends.length;j++){
							arr.push(this.policylist[i].extends[j])
							if(j==e){
								arr[j].isdelete=true
								
							}else{
								arr[j].isdelete=false
								
							}
						}
						this.policylist[i].extends=arr
					}
				}
			},
			//取消删除
			isdeletefalse(){
				for(let i=0;i<this.policylist.length;i++){
						let arr=[]
						for(let j=0;j<this.policylist[i].extends.length;j++){
							arr.push(this.policylist[i].extends[j])
							arr[j].isdelete=false
						}
						this.policylist[i].extends=arr
				}
			},
				//取消编辑
			edithide(){
				for(let i=0;i<this.policylist.length;i++){
						let arr=[]
						for(let j=0;j<this.policylist[i].extends.length;j++){
							arr.push(this.policylist[i].extends[j])
							arr[j].iseditshow=false
						}
						this.policylist[i].extends=arr
				}
			},
			//下通编辑展示
			Lowerpasseeditshow(val,e){
				let str = JSON.stringify(val);
				this.additional = JSON.parse(str);
				var arr=[]
				for(let i=0;i<this.policylist.length;i++){
					arr.push(this.policylist[i])
					if(i==e){
						arr[i].Lowerpassiseditshow=true
						
					}else{
						arr[i].Lowerpassiseditshow=false
					}
				}
				
				this.policylist=arr
			},
			Lowerpassedithide(){
				var arr=[]
				for(let i=0;i<this.policylist.length;i++){
					arr.push(this.policylist[i])
					arr[i].Lowerpassiseditshow=false
				}
				
				this.policylist=arr
				
				
			},
				//编辑展示
			editshow(val,e,oute){
				this.isdeletefalse()
				let str = JSON.stringify(val);
				this.additional = JSON.parse(str);
				var arr=[]
				for(let i=0;i<this.policylist.length;i++){
					if(i==oute){
						for(let j=0;j<this.policylist[i].extends.length;j++){
							arr.push(this.policylist[i].extends[j])
							if(j==e){
								arr[j].iseditshow=true
								
							}else{
								arr[j].iseditshow=false
								
							}
						}
						this.policylist[i].extends=arr
					}
				}
				console.log(arr)
			},
			//验证输入
			blurs1(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.additional, "lowerBrokerageTraffic", aa)
			},
			blurs2(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.additional, "lowerRewardTraffic", aa)
			},
			blurs3(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.additional, "lowerBrokerageBusiness", aa)
			},
			blurs4(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.additional, "lowerRewardBusiness", aa)
			},
				clearNoNum(obj) {
				obj = obj.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
				obj = obj.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
				obj = obj.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
				obj = obj.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
				if(obj.indexOf(".") < 0 && obj != "") {
					//以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
					obj = parseFloat(obj);
				}
				if(obj >= 100) {
					obj = 100
				}
				if(obj == "") {
					obj = 0
				}
				console.log(obj)
				return obj

			},
			//删除政策
			deletepolicy(val){
				console.log(val)
				let params = {
					policyBatchType:1,
					policyId:val.extendID,
					policyItemRatesID:val.policyItemRateId,
				}
				 this.post(params,"services/app/policy/DeletePolicy").then(res=>{
							console.log(res)
							if(res.success){
								this.$notify({
						          title: '删除成功',
						          message: '您已成功删除一条政策',
						          type: 'success',
						          customClass:"el-notification-success"
						        });
								this.getPolicyList()
							}else{
								 this.$notify.error({
						              title: '错误',
						              message: res.error.message
						            });
		
							}
						})
			},
			//修改单挑政策数据
			subpolicy(val){
				console.log(val)
				let a1 = parseFloat(this.additional.lowerBrokerageTraffic)
				let a2 = parseFloat(this.additional.lowerRewardTraffic)
				let b1 = parseFloat(this.additional.lowerBrokerageBusiness)
				let b2 = parseFloat(this.additional.lowerRewardBusiness)
				console.log(a1)
				console.log(a2)
				console.log(b1)
				console.log(b2)
				let obj = {
					policyId:val.policyId,
					lowerBrokerageBusiness:val.lowerBrokerageBusiness,
					lowerRewardBusiness:val.lowerRewardBusiness,
					lowerBrokerageTraffic:val.lowerBrokerageTraffic,
					lowerRewardTraffic:val.lowerRewardTraffic,
					lowerBrokerageVehicleTax:val.lowerBrokerageVehicleTax,
					lowerRewardVehicleTax:val.lowerRewardVehicleTax,
					extends:[
						{						
						extendID:this.additional.extendID,
						lowerBrokerageBusiness:this.additional.lowerBrokerageBusiness,
						lowerRewardBusiness:this.additional.lowerRewardBusiness,
						lowerBrokerageTraffic:this.additional.lowerBrokerageTraffic,
						lowerRewardTraffic:this.additional.lowerRewardTraffic,
						lowerBrokerageVehicleTax:this.additional.lowerBrokerageVehicleTax,
						lowerRewardVehicleTax:this.additional.lowerRewardVehicleTax
						}
					]
				}
				if(a1 + a2 > 100 && b1 + b2 > 100){
					this.indexs_tow = 2
					this.indexs = 1
				}else if(a1 + a2 > 100 || b1 + b2 > 100) {
							if(a1 + a2 > 100) {
								this.indexs_tow = 2
								this.indexs = null
							} else {
								this.indexs_tow =null
								this.indexs = 1
							}

						} else {
							this.indexs_tow=null
							this.indexs = null
							let arr=[]
							arr.push(obj)
							let params={
								items:arr
							}
							
							this.post(params,'services/app/policy/UpdateLowerPolicyCustom').then(rs => {
								if(rs.success){
									console.log("success")
									console.log(rs)
									this.getPolicyList()
									this.edithide()
								}else{
									  this.$notify.error({
							              title: '错误',
							              message: res.error.message
							            });
								}
							})
						}
				
			},
			
			//驳回确定
				toDis_sure(formName){
				this.$refs[formName].validate((valid) => {
		          if (valid) {
		            let params = {
						policyBatchId:this.id,
						dismissalSeason:this.ruleForm.dismissalSeason
					}
					this.post(params,'services/app/policy/UpdatePolicyBatchStateToDismissal').then(res=>{
						if (res.success) {
							this.$notify({
	                         title: '成功',
	                         message: '已驳回',
	                         type: 'success'
	                        });
                       
	                      	this.$router.push({
								name:"policydown"
							})
	                      	 this.Rejectshow=false;
						}
					})
		          } else {
		            this.failNot(re.error.message)
		          }
		        });
			},
			//添加下游政策
			addlowpolic(val){
				let arr=[]
				Vue.set(this.json,"targetId",arr)
				this.isshow = true;
				console.log(11111)
				console.log(this.json.targetId instanceof Array )
				
				Vue.set(this.json,"policyItemId",val.policyId)
			},
			//提交审核
			toexamine(){
				if(this.existence.length == 0){
					//无冲突
						var txt = '确定提交审核吗？'
						this.$confirm(txt, '审核提示', {
							confirmButtonText: '确定',
							cancelButtonText: '取消',
							closeOnClickModal:false
							// type: 'warning'
						}).then(() => {
							this.toRovalPost();
						});
					
				}else{
					//有冲突
					this.dialogTableVisible=true	
				}
			},
				//去修改
			goEdit() {
				this.dialogTableVisible=false
			},
			//继续提交
			toRoval_sure() {
				this.dialogTableVisible = false;
				this.toRovalPost();
			},
			//无冲突提交
			toRovalPost() {
				let params = {
					policyBatchId: this.id
				}
				this.post(params, 'services/app/policy/UpdatePolicyBatchStateToApprovalPending').then(re => {
					if(re.success) {
						this.rovalHtml='已提交';
						this.rovalDisa=true;
						this.successNot();
						this.$router.push({
								name:"policydown"
							})
					}else{
						this.failNot(re.error.message)
					}
				});
			},
			//删除批次
			deletebatch(){
				let params = {
					id: this.id
				}
				var txt = '确定删除吗？'
				this.$confirm(txt, '审核提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					this.post(params, 'services/app/policy/DeletePolicyBatch').then(re => {
						if(re.success) {
							console.log(re)
							this.$notify({
					          title: '删除成功',
					          message: '您已成功删除一条下游批次',
					          type: 'success',
					          customClass:"el-notification-success"
					        });
							this.$router.push({
								name: "policydown"
							})
						} else {
							this.failNot(re.error.message)
						}
					});
				});
			},
			//申请编辑
			Applicationeditor(){
					let params = {
					policyBatchId: this.id
				}
				var txt = '确定申请编辑吗？'
				this.$confirm(txt, '审核提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					this.post(params, 'services/app/policy/UpdatePolicyBatchStateToEditing').then(re => {
						if(re.success) {
							console.log(re)
							this.successNot();
							this.$router.push({
								name: "policydown"
							})
						} else {
							this.failNot(re.error.message)
						}
					});
				});
			},
			//生成下游政策
			generate(){
				
			},
			//通过
			adopt(){
					let params = {
					policyBatchId: this.id
				}
				var txt = '确定通过审核吗？'
				this.$confirm(txt, '审核提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					closeOnClickModal: false
					// type: 'warning'
				}).then(() => {
					this.post(params, 'services/app/policy/UpdatePolicyBatchStateToApproval').then(re => {
						if(re.success) {
							console.log(re)
							this.successNot();
							this.$router.push({
								name: "policydown"
							})
						} else {
							this.failNot(re.error.message)
						}
					});
				});
			},
			//驳回
			reject(){
				this.Rejectshow=true
			},
			//保存成功提示
		    successNot(){
		      	this.$notify({
		          title: '提交成功',
		          message: '您已成功提交一条下游批次',
		          type: 'success',
		          customClass:"el-notification-success"
		        });
		    },
		    //保存失败提示
		    failNot(message){
		      	this.$notify.error({
		          title: '保存失败',
		          message: message,
		          duration: 0,
		          customClass:"el-notification-error"
		        });
		    },
			//编辑基本嘻嘻
			btn(formName) {
				console.log(11111)
				//this.copyinfo.id=this.id
				this.$refs[formName].validate((valid) => {
					if(valid) {
						console.log(333)
						let params = {
							id:this.id,
							batchName:this.copyinfo.batchName,
							upperBatchID:this.copyinfo.upperBatchID,
							staffId:this.copyinfo.staffId,
							effectiveDate:this.copyinfo.effectiveDate,
							expiryDate :this.copyinfo.expiryDate,
						}
						console.log(params)
						this.post(params, "services/app/policy/CreateLowerPolicyBatch").then(res => {
							if(res.success) {
								console.log("更改批次信息")
								console.log(res)
								this.getBasic()
								this.isshows=false
							} else {
								this.$notify.error({
									title: '错误',
									message: res.error.message
								});

							}

						});
					} else {
						console.log(444)
						return false;
					}
				});

			},
			batchedit() {　
				console.log(this.workoptions)
				let str = JSON.stringify(this.info);　
				this.copyinfo = JSON.parse(str);
				let arr = []
				for(let i = 0; i < this.copyinfo.staffNames.length; i++) {
					arr.push(this.copyinfo.staffNames[i].staffId)
				}
				Vue.set(this.copyinfo, 'staffId', arr)
				console.log(this.copyinfo)
				this.isshows = true
			},
			//获取公司列表
			getcommoy() {
				let params = {};
				this.post(params, "services/app/common/GetGroupInsurances").then(res => {
					this.options = res.result.items
				});
			},
			//信息
			getBasic() {
				let params = {
					id: this.id
				}
				this.post(params, 'services/app/policy/GetPolicyBatchBasic').then(rs => {
					if(rs.success) {
						console.log('success_shuju')
						console.log(rs.result)
						this.info = rs.result;
						this.info.upperBatchID=rs.result.referId
						//默认工号列表
						this.workoptions = rs.result.staffNames
//						for(var i = 0; i < this.workoptions.length; i++) {
//							if(this.workoptions[i].describe != "") {
//								this.workoptions[i].staffAccount = this.workoptions[i].staffAccount + " (" + this.workoptions[i].describe + ")"
//							} else {
//								this.workoptions[i].staffAccount = this.workoptions[i].staffAccount
//							}
//						}
						if(this.info.expiryDate) {
							this.islimit = false
						} else {
							this.islimit = true
						}
						this.getcommoy()
						//默认政策
						this.getuppoliy(rs.result.insuranceId)
					}
				})
				this.post(params, "services/app/policy/CheckEffectivedPolicyBatch").then(res => {
					if(res.success){
						this.existence=res.result.items
						
					}else{
						  this.$notify.error({
				              title: '错误',
				              message: res.error.message
				            });
					}
					
				});
				
			},
			//获取下游政策批次
			getuppoliy(val) {
				console.log(val)
				let params = {
					insuranceId: val
				};
				this.post(params, "services/app/policy/GetUpperHistoryBatchList").then(res => {
					if(res.success) {
						console.log("upnum")
						console.log(res)
						this.uppoliy = res.result.items
					} else {
						this.$notify.error({
							title: '错误',
							message: res.error.message
						});
					}

				});
			},
			//信息表
			getPolicyList() {
				let params = {
					//'id':'AFE5BBB3-9E30-46D2-9166-03316C65092D'
					id: this.id
				}
				this.post(params, 'services/app/policy/GetAllPolicyList').then(rs => {
					if(rs.success) {
						console.log("biaoshuju")
						console.log(rs.result.items);
						this.policylist = rs.result.items;
						let re = /^[0-9]+.?[0-9]*/;
						this.policylist.forEach(item => {
							if(item) {
								item.Lowerpassiseditshow=false
								for(var i in item) {
									if(re.test(item[i])) {
//										if(item[i] == 0) {
//											item[i] = '';
//										}
									}
									if(i == 'upperBrokerageTraffic') {
										item[i] = item[i] + '';
										if(item[i] == '') {
											item[i] = '0';
										}
									}
									if(i == 'upperRewardTraffic') {
										item[i] = item[i] + '';
										if(item[i] == '') {
											item[i] = '0';
										}
									}
									if(i == 'upperBrokerageBusiness') {
										item[i] = item[i] + '';
										if(item[i] == '') {
											item[i] = '0';
										}
									}
									if(i == 'upperRewardBusiness') {
										item[i] = item[i] + '';
										if(item[i] == '') {
											item[i] = '0';
										}
									}
									if(i == 'lowerBrokerageTraffic') {
										item[i] = item[i] + '';
									}
									if(i == 'lowerRewardTraffic') {
										item[i] = item[i] + '';
									}
									if(i == 'lowerBrokerageBusiness') {
										item[i] = item[i] + '';
									}
									if(i == 'lowerRewardBusiness') {
										item[i] = item[i] + '';
									}
									if(item['extends']) {
										item['extends'].forEach(ins => {
											item['extends'].iseditshow=false
											item['extends'].isdelete=false
											if(ins) {
												for(var j in ins) {
													if(re.test(ins[j])) {
														if(ins[j] == 0) {
															ins[j] = '';
														}
													}
													if(j == 'lowerBrokerageTraffic') {
														ins[j] = ins[j] + '';
													}
													if(j == 'lowerRewardTraffic') {
														ins[j] = ins[j] + '';
													}
													if(j == 'lowerBrokerageBusiness') {
														ins[j] = ins[j] + '';
													}
													if(j == 'lowerRewardBusiness') {
														ins[j] = ins[j] + '';
													}
												}
											}
										})
									}
								}
							}
						})
					}
				})
			},
			//两位小数
			twoBit(value) {
				if(value) {
					console.log(value);
					value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符  
					value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的  
					value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
					value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数  
					if(value.indexOf(".") < 0 && value != "") { //以下已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额 
						value = parseFloat(value);
					}
					// value = value;
					return value
				}
			},
			//验证小数
			getTest(item) {
				console.log(item);
				const that = this;
				// let re = /^[0-9\.]+$/g;          
				let re2 = /^\d+(\.\d{1,2})?$/;
				for(let i in item) {
					if(i == 'lowerBrokerageTraffic' || i == 'lowerRewardTraffic' || i == 'lowerBrokerageBusiness' || i == 'lowerRewardBusiness') {
						if(!re2.test(item[i])) {
							Vue.set(item, i, that.twoBit(item[i]))
							this.getchange(item);
							// console.warn(item[i]);
						}
					}
				}
			},
			//验证100
			getchange(item) {
				console.log(item);
				const that = this;
				let re = /^[0-9]+.?[0-9]*/;
				for(var i in item) {
					if(item[i] === '') {
						item[i] = '0';
					}
					if(re.test(item[i])) {
						if(i == 'lowerBrokerageTraffic') {
							if(Number(item[i]) + Number(item['lowerRewardTraffic']) > 100) {
								Vue.set(item, 'traffic', true)
							} else {
								Vue.set(item, 'traffic', false)
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, 'traffic1', true)
							} else {
								Vue.set(item, 'traffic1', false)
							}
						}
						if(i == 'lowerRewardTraffic') {
							if(Number(item[i]) + Number(item['lowerBrokerageTraffic']) > 100) {
								Vue.set(item, 'traffic', true)
							} else {
								Vue.set(item, 'traffic', false)
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, 'traffic2', true)
							} else {
								Vue.set(item, 'traffic2', false)
							}
						}
						if(i == 'lowerBrokerageBusiness') {
							if(Number(item[i]) + Number(item['lowerRewardBusiness']) > 100) {
								Vue.set(item, 'business', true)
							} else {
								Vue.set(item, 'business', false)
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, 'business1', true)
							} else {
								Vue.set(item, 'business1', false)
							}
						}
						if(i == 'lowerRewardBusiness') {
							if(Number(item[i]) + Number(item['lowerBrokerageBusiness']) > 100) {
								Vue.set(item, 'business', true)
							} else {
								Vue.set(item, 'business', false)
							}
							if(Number(item[i]) > 100) {
								Vue.set(item, 'business2', true)
							} else {
								Vue.set(item, 'business2', false)
							}
						}
					}
				}
			},
			//遍历，空为0
			eachArr4(arr) {
				let re = /^[0-9]+.?[0-9]*/;
				arr.forEach(item => {
					if(item) {
						for(var i in item) {
							if(re.test(item[i])) {
								if(item[i] == '') {
									item[i] = '0';
								}
							}
							if(i == 'upperBrokerageTraffic' && item['upperBrokerageTraffic'] == '') {
								item[i] = '0';
								console.log(item[i]);
							}
							if(i == 'upperRewardTraffic' && item['upperRewardTraffic'] == '') {
								item[i] = '0';
							}
							if(i == 'upperBrokerageBusiness' && item['upperBrokerageBusiness'] == '') {
								item[i] = '0';
							}
							if(i == 'upperRewardBusiness' && item['upperRewardBusiness'] == '') {
								item[i] = '0';
							}
							if(i == 'lowerBrokerageTraffic' && item['lowerBrokerageTraffic'] == '') {
								item[i] = '0';
							}
							if(i == 'lowerRewardTraffic' && item['lowerRewardTraffic'] == '') {
								item[i] = '0';
							}
							if(i == 'lowerBrokerageBusiness' && item['lowerBrokerageBusiness'] == '') {
								item[i] = '0';
							}
							if(i == 'lowerRewardBusiness' && item['lowerRewardBusiness'] == '') {
								item[i] = '0';
							}
							if(item['extends']) {
								item['extends'].forEach(ins => {
									if(ins) {
										for(var j in ins) {
											if(re.test(ins[j])) {
												if(ins[j] == 0) {
													ins[j] = '';
												}
											}
											if(j == 'lowerBrokerageTraffic' && item['lowerBrokerageTraffic'] == '') {
												ins[j] = '0';
											}
											if(j == 'lowerRewardTraffic' && item['lowerRewardTraffic'] == '') {
												ins[j] = '0';
											}
											if(j == 'lowerBrokerageBusiness' && item['lowerBrokerageBusiness'] == '') {
												ins[j] = '0';
											}
											if(j == 'lowerRewardBusiness' && item['lowerRewardBusiness'] == '') {
												ins[j] = '0';
											}
										}
									}
								})
							}
						}
					}
				})
				return arr;
			},
			
			//详情
			toDetail(val) {
				console.log(val)
				this.$router.push({
					name: "policydowninfo",
					query: {
						batchId: this.id,
						policyId:val,
						status:this.info.state,
						stream:2,
						Jurisdiction:this.Jurisdiction 
					}
				})
			},
			toEdit() {
				this.$router.push({
					name: "policyupnewdd",
					query: {
						batchId: this.id,
						stream:2,
						Jurisdiction:this.Jurisdiction
					}
				})
			},
			//编辑
			setNew(id) {
				this.json.policyItemId = id;
				let arr=[]
				Vue.set(this.json,"targetId",arr)
				this.isshow = true;
				console.log(11111)
				console.log(this.json.targetId instanceof Array )
				//this.getUnits()
				
			},
			//----------------------dialog
			//用户信息
			getuesr() {
				let params = {};
				this.post(params, "services/app/common/GetUsers").then(
					rs => {
						console.log(rs);
						if(rs.success) {
							console.log('success')
							console.log(rs)
							this.userlist = rs.result.users
						}
					}
				);
			},
			//组织机构
			getUnits() {
				let params = {};
				this.post(params, "services/app/common/GetCurrentOrganizationUnits").then(
					rs => {
						console.log(rs);
						if(rs.success) {
							let data = rs.result;
							let arr = [];
							arr.push(data);
							this.treeData = arr;
							// console.log(rs.result);
							// console.log(this.treeData);
							// console.log('-----------');
						}
					}
				);
			},
//			//tree
//			setSelectedId(val) {
//				console.log(val);
//				this.json.targetId = val;
//			},
			blurs1(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.json, "lowerBrokerageTraffic", aa)
			},
			blurs2(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.json, "lowerRewardTraffic", aa)
			},
			blurs3(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.json, "lowerBrokerageBusiness", aa)
			},
			blurs4(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.json, "lowerRewardBusiness", aa)
			},
			blurs5(val) {
				let aa = this.clearNoNum(val.target.value)
				Vue.set(this.json, "lowerBrokerageVehicleTax", aa)
			},
			clearNoNum(obj) {
				obj = obj.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
				obj = obj.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
				obj = obj.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
				obj = obj.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
				if(obj.indexOf(".") < 0 && obj != "") {
					//以上已经过滤，此处控制的是如果没有小数点，首位不能为类似于 01、02的金额
					obj = parseFloat(obj);
				}
				if(obj >= 100) {
					obj = 100
				}
				if(obj == "") {
					obj = 0
				}
				console.log(obj)
				return obj

			},
			submits(formName) {
				let a1 = parseFloat(this.json.lowerBrokerageTraffic)
				let a2 = parseFloat(this.json.lowerRewardTraffic)
				let b1 = parseFloat(this.json.lowerBrokerageBusiness)
				let b2 = parseFloat(this.json.lowerRewardBusiness)
				console.log(this.json)
				this.$refs[formName].validate((valid) => {
					if(valid) {
						if(a1 + a2 > 100 && b1 + b2 > 100){
							this.indexs_tow = 2
							this.indexs = 1
						}else if(a1 + a2 > 100 || b1 + b2 > 100) {
							if(a1 + a2 > 100) {
								this.indexs = 1
								this.indexs_tow = null
							} else {
								this.indexs_tow = 2
								this.indexs = null
							}

						} else {
							this.indexs_tow=null
							this.indexs = null
							console.log(this.json)
							this.json.targetId = this.json.targetId.join(",")
							let arr = [];
							arr.push(this.json);
							let params = {
								"extends": arr
							}
							this.post(params, "services/app/policy/PolicyAddExtendInfo").then(rs => {
								console.log(rs)
								this.getBasic();
								this.getPolicyList();
							});
							this.isshow = false
						}

					} else {
						console.log('error submit!!');
						return false;
					}
				});
			}
		}
	}
</script>
<style lang='scss' scoped>
*{
	box-sizing: border-box;
}
	.content {
		width: 100%;
		height: 500px;
		overflow: auto;
		font-size: 12px;
	}
	
	.inputs {
		width: 250px;
		font-size: 12px;
	}
	
	.numinp {
		width: 60px;
		margin-left: 5px;
	}
	
	.numcontent {}
	
	.btns {
		display: flex;
		justify-content: center;
	}
	
	.actives .numinp {
		border: 1px solid #f56c6c;
	}
	/*#f56c6c*/
	
	.rh {
		float: right;
		height: 28px;
		span {
			display: inline-block;
			width: 80px;
		}
		selectone {
			display: inline-block;
		}
		.util-select {
			width: 190px;
		}
	}
	/*---------------------------------*/
	
	.wd100 {
		width: 100px;
		height: 32px;
	}
	
	.setH {
		line-height: 40px;
		height: 40px;
		border-bottom: 1px solid #e8e8e8;
	}
	
	.setH:last-child {
		border-bottom: 0;
	}
	
	.app-container {
		.policyupper3c {
			padding: 0 68px 0 68px;
			.p-detail {
				margin-top: 50px;
				p {
					font-size: 14px;
					color: #333;
					margin: 20px 0;
					display: flex;
					justify-content: flex-start;
					align-items: center;
					i {
						color: #FF9430;
						margin: 3px 10px 0 0;
					}
					.state {
						width: 50px;
						height: 23px;
						display: flex;
						justify-content: center;
						align-items: center;
						font-size: 12px;
						margin-left: 10px;
						border-radius: 3px;
						color: #FFFFFF;
					}
					.state1 {
						background: #027DCA;
					}
					.state2 {
						background: #389E0D;
					}
					.state3 {
						background: #666666;
					}
					.state4 {
						background: #FF7819;
					}
					.state5 {
						background: #CF1322;
					}
					.state6 {
						background: #389E0D;
					}
					.add {
						font-size: 10px;
						color: #fff;
						background: #ff9430;
						border-radius: 8px;
						width: 30px;
						height: 15px;
						display: inline-block;
						text-align: center;
						margin-left: 10px;
						transform: scale(0.9)
					}
				}
				.d-box {
					background: #eaf5fb;
					//width: 100%;
					height: 79px;
					padding: 15px 30px;
					position: relative;
					.editbatch {
						position: absolute;
						width: 78px;
						height: 18px;
						font-size: 13px;
						color: #027DCA;
						right: 0;
						top: -33px;
						background: red;
						background: transparent;
						padding: 0;
						border: 0;
						outline: none;
						cursor: pointer;
					}
					p {
						margin: 0;
						span {
							font-size: 12px;
							color: #95bacc;
						}
						.d-setc {
							color: #2e94c5;
						}
						.isF:first-child {
							display: none;
						}
					}
					p:nth-of-type(1) {
						margin-bottom: 16px;
					}
				}
			}
			.tableinof .tecenter:last-child td{
				border-bottom:0!important;
			}
			.p-list {
				//width:100%;
				.util-table {
					//width:100%;
					
					border: 0;
					//border-bottom:1px solid #e8e8e8;
					border-collapse: collapse;
					tr {
						th {
							background: #334750;
							color: #fff;
							border: 0;
							text-align: center;
						}
						td {
							tr{
								td{
									padding:0;
									font-size: 14px;
									border-bottom: double #e8e8e8;
									.inputset {
										background: #e8e8e8;
										border: 1px solid #c3c1c1;
										width: 45px;
										height: 21px;
										text-align: right;
										color: #333333;
										font-size: 12px;
										padding: 3px;
									}
								}
							}
							padding:0;
							font-size: 14px;
							border-bottom: double #e8e8e8;
							.inputset {
								background: #e8e8e8;
								border: 1px solid #c3c1c1;
								width: 45px;
								height: 21px;
								text-align: right;
								color: #333333;
								font-size: 12px;
								padding: 3px;
							}
							span {
								font-size: 13px;
							}
							.setred {
								border: 1px solid #ff0000;
							}
							a {
								color: #027dca;
								font-size: 13px;
							}
							.addN {
								font-size: 14px;
								color: #027DCA;
								cursor: pointer;
							}
						}
						.setc {
							text-align: center;
							padding: 0;
							.spanset {
								display: block;
								line-height: 40px;
								height: 40px;
								text-align: center;
								color: #333333;
								border-bottom: 1px solid #e8e8e8;
							}
							.setg {
								color: #019F6C;
								font-size: 12px;
								line-height: 40px;
								height: 40px;
								min-width: 100px;
								display: block;
								border-bottom: 1px solid #e8e8e8;
								span {
									color: #019F6C;
									font-size: 12px;
								}
							}
							.setg:last-child {
								border-bottom: 0;
							}
							.setr {
								color: #FF0000;
								font-size: 12px;
								line-height: 40px;
								height: 40px;
								display: block;
								border-bottom: 1px solid #e8e8e8;
							}
						}
					}
				}
			}
			.p-btn {
				text-align: center;
				margin: 20px 0;
				.setborder {
					background: #FF7819;
					border-radius: 4px;
					font-size: 14px;
					color: #FFFFFF;
				}
			}
		}
	}
	
	.informationaa {
		width: 100%;
		margin: 0 auto 20px;
		font-size: 12px;
		position: relative;
	}
	
	.selects {
		width: 328px;
	}
	
	.dateinp {
		font-size: 12px;
		width: 150px;
	}
	
	.line {
		text-align: center;
	}
	
	.sscheckbox {
		position: absolute;
		left: 350px;
		top: 0;
		height: 100%;
		width: 80px;
	}
	.informations {
		margin-bottom: 0;
		}
		.texts {
		width: 385px;
		margin-top: 10px;
		font-size: 13px;
		color: #CBCBCB;
		letter-spacing: 0;
		text-align: left;
		text-indent: 0;
		margin: 20px 0 0 0;
		line-height: 18px;
		.icon-xuanzhong {
			color: #FF7819;
			font-size: 8px;
		}
		span {
			color: #1989FA;
		}
	}
	.informationdd{
		display:flex;
		justify-content: center;
		align-items: center;
	}
	.btn {
		display: block;
		margin-left:-120px;
		
	}
	.tecenter td{
		text-align:center;
		height:40px;
		
	}
	.tecenter .operation_btn{
		width:100%;
		height:100%;
		display:flex;
		justify-content: center;
		align-items: center;
		span{
			margin-right:10px;
			font-size: 13px;
			color: #027DCA;
			cursor:pointer;
		}
	}
	.upname{
		color:red;
	}
	.downname{
		color: #027DCA;
	}
	.setc{
						text-align: center;
						font-size: 12px;
						color: #333333;
						
					}
	.btnsetc{
						justify-content: center;
						margin-left:0;
						position:relative;
						a:not(:first-of-type){
							margin-left:12px;
						}
						.Proportionedit_delete{
							position:absolute;
							width:250px;
							
							top:100%;
							left:-80px;
							background:red;
						}
						.Proportionedit{
							position:absolute;
							width:420px;
							height:164px;
							top:100%;
							right:0;
							display:flex;
							flex-direction: column;
							justify-content: flex-start;
							z-index:33;
							padding:10px 0 10px 0;
							
							.Proportionedit_top{
								width:100%;
								height:93px;
								display:flex;
								margin-bottom:20px;
								.Proportionedit_left{
									width:50%;
									height:100%;
									display:flex;
									justify-content: flex-start;
									flex-direction: column;
									align-items: center;
									
									.Proportionedit_title{
										width:100%;
										font-size: 14px;
										color: #40819E;
										margin:0;
										height:22px;
										margin-bottom:11px;
										text-align:center;
									}
									.Proportionedit_name{
										width:100%;
										display:flex;
										justify-content: space-around;
										align-items: center;
										height:22px;
										margin-bottom:5px;
										font-size: 13px;
										color: #666666;
										.Proportionedit_inp{
											width:50px;
											font-size: 12px;
											color: #333333;
											height:22px;
											text-align:center;
											outline:none;
										}
									}
								}
							}
							.Proportionedit_btn{
								width:100%;
								height:28px;
								margin-top:27px;
								display:flex;
								justify-content: flex-end;
								align-items: center;
								button{
									background: #F7F7F7;
									border: 1px solid #DDDDDD;
									border-radius: 5px;
									width:50px;
									height:28px;
									margin-left:20px;
									cursor:pointer;
								}
								.surebtn{
									background: #FF7819;
									border: 1px solid #EE6000;
									border-radius: 5px;
									outline:none;
									color: #FFFFFF;
								}
							}
						}
					}
					.actives input{
		border:1px solid red;
	}
	.activess  input{
		border:1px solid red;
	}
	.daos{
		color: #95bacc;
		margin:0 3px;
	}
</style>